package com.compass.doctor.ui.prescription.adapter

import android.view.LayoutInflater
import android.view.ViewGroup
import com.compass.doctor.databinding.LayoutDiagnoseItemBinding
import com.compass.framework.adapter.BaseBindViewHolder
import com.compass.framework.adapter.BaseRecyclerViewAdapter
import com.compass.framework.model.ArticleInfo
import com.compass.framework.model.Diagnosis
import java.text.SimpleDateFormat
import java.util.Locale

/**
 * Description： 诊断adapter
 * Date:2023/12/15 11:03
 */
class DiagnoseAdapter : BaseRecyclerViewAdapter<Diagnosis, LayoutDiagnoseItemBinding>() {



    override fun getViewBinding(
        layoutInflater: LayoutInflater,
        parent: ViewGroup,
        viewType: Int
    ): LayoutDiagnoseItemBinding {
        return LayoutDiagnoseItemBinding.inflate(layoutInflater, parent, false)
    }

    override fun onBindDefViewHolder(
        holder: BaseBindViewHolder<LayoutDiagnoseItemBinding>,
        item: Diagnosis?,
        position: Int
    ) {
        if (item == null) return
        holder.binding.apply {
            tvDiagnoseName.text = item.name

        }
    }
}